package com.example.mydemo2;

import android.os.Parcel;
import android.os.Parcelable;

public class OrdersItem implements Parcelable {
    private String orderDate;
    private String salePeople;
    private String recyclePeople;
    private String thingType;
    private int totalCount;
    private int price;
    private int total;

    protected OrdersItem(Parcel in) {
        orderDate = in.readString();
        salePeople = in.readString();
        recyclePeople = in.readString();
        thingType = in.readString();
        totalCount = in.readInt();
        price = in.readInt();
        total = in.readInt();
    }

    public static final Creator<OrdersItem> CREATOR = new Creator<OrdersItem>() {
        @Override
        public OrdersItem createFromParcel(Parcel in) {
            return new OrdersItem(in);
        }

        @Override
        public OrdersItem[] newArray(int size) {
            return new OrdersItem[size];
        }
    };


    public String getOrderDate() {
        return orderDate;
    }

    @Override
    public String toString() {
        return "OrdersItem{" +
                "orderDate='" + orderDate + '\'' +
                ", salePeople='" + salePeople + '\'' +
                ", recyclePeople='" + recyclePeople + '\'' +
                ", thingType='" + thingType + '\'' +
                ", totalCount=" + totalCount +
                ", price=" + price +
                ", total=" + total +
                '}';
    }

    public void setOrderDate(String orderDate) {
        this.orderDate = orderDate;
    }

    public String getSalePeople() {
        return salePeople;
    }

    public void setSalePeople(String salePeople) {
        this.salePeople = salePeople;
    }

    public String getRecyclePeople() {
        return recyclePeople;
    }

    public void setRecyclePeople(String recyclePeople) {
        this.recyclePeople = recyclePeople;
    }

    public String getThingType() {
        return thingType;
    }

    public void setThingType(String thingType) {
        this.thingType = thingType;
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public OrdersItem() {
    }

    public OrdersItem(String orderDate, String salePeople, String recyclePeople, String thingType, int totalCount, int price, int total) {
        this.orderDate = orderDate;
        this.salePeople = salePeople;
        this.recyclePeople = recyclePeople;
        this.thingType = thingType;
        this.totalCount = totalCount;
        this.price = price;
        this.total = total;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(orderDate);
        parcel.writeString(salePeople);
        parcel.writeString(recyclePeople);
        parcel.writeString(thingType);
        parcel.writeInt(totalCount);
        parcel.writeInt(price);
        parcel.writeInt(total);
    }
}
